package site.weiyikai.eventdriven.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import site.weiyikai.eventdriven.core.Delivery;
import site.weiyikai.eventdriven.core.EventService;
import site.weiyikai.eventdriven.core.EventServiceImpl;

import javax.annotation.Resource;

/**
 * 事件服务配置类
 *
 * @author 程序员小魏
 * 创建时间: 2023/11/11
 */
@Configuration
public class EventServiceConfig {

    

    @Resource
    private Delivery deliveryStrategy;

    @Bean
    public EventService eventService() {
        return new EventServiceImpl(deliveryStrategy);
    }

}
